//
//  BackGroundTaskView.h
//  CoreBlueTooth
//
//  Created by bodyconn on 15/2/2.
//  Copyright (c) 2015年 bodyconn. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

@interface BackGroundTaskView : NSObject <AVAudioPlayerDelegate>

AS_SINGLETON(BackGroundTaskView)

typedef void (^BackGroundTask)(BOOL BackState);

@property (nonatomic, strong) BackGroundTask             BackGroundTaskBlock;
@property (nonatomic, assign) UIBackgroundTaskIdentifier bgTaskId; /* 后台任务*/
@property (nonatomic, assign) int                        Runcount;
@property (nonatomic, assign) int                        RunTotalCount;
@property (nonatomic, assign) BOOL                       isBackGroundTask; /* 是否自动重连*/

@property(nonatomic, assign) UIBackgroundTaskIdentifier bgTask;

@property (nonatomic, strong) NSTimer *backTaskModeTimer;
@property (nonatomic, assign) bool    isBackTast;

@end

